package com.jixiaotian.spring.annotation.demo.annotation.componentscan;

import com.jixiaotian.spring.annotation.demo.annotation.Entity;
import com.jixiaotian.spring.annotation.project.controller.MyController;
import com.jixiaotian.spring.annotation.project.entity.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;

/**
 * @Author: jixiaotian.ch@qq.com
 * @Date : 2020/9/10
 */
@Configuration
@ComponentScan(value = "com.jixiaotian.spring.annotation.project"
//    ,includeFilters = {@Filter(type = FilterType.ANNOTATION,value = {Controller.class,Entity.class})}
//    ,includeFilters = {@Filter(type = FilterType.ASSIGNABLE_TYPE,value = {Person.class})}
    ,includeFilters = {@Filter(type = FilterType.CUSTOM,value = {MyTypeFilter.class})}
    ,useDefaultFilters = false
//    ,excludeFilters = {@Filter(type = FilterType.ANNOTATION,value = {Entity.class})}
)
public class MyConfig {



}
